package com.pioneer.gui.invoice.controller;
import com.pioneer.gui.invoice.util.Constants;
import com.pioneer.gui.invoice.model.InvoiceTableModel;
//import com.pioneer.gui.invoice.model.DropDownValue;
import com.pioneer.gui.invoice.model.DropDownList;

import java.awt.Component;
import javax.swing.table.TableCellRenderer;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JTable;

public class DetailsTableCellRenderer
implements TableCellRenderer,Constants
		{
			public Component getTableCellRendererComponent(JTable table,
                                               Object value,
                                               boolean isSelected,
                                               boolean hasFocus,
                                               int row,
                                               int column)
			{
				InvoiceTableModel invoiceTableModel=(InvoiceTableModel)table.getModel();
				if (column==1)
				{
					return new JComboBox(new DropDownList(SALESMAN_LIST));
				}
				return new JLabel(value.toString());
			}
			
        }